#include "TextUpButtonListener.h"

TextUpButtonListener::TextUpButtonListener(std::list<TextScrollBarElement*> *elements) {
	this->elements = elements;
}

TextUpButtonListener::TextUpButtonListener() {

}

TextUpButtonListener::~TextUpButtonListener() {
	this->elements = NULL;
}

void TextUpButtonListener::execute() {
	if (this->elements->front()->isVisible()) {
		return;
	}

	TextScrollBarElement* element = NULL;
	for (this->it_element = this->elements->begin(); this->it_element
			!= this->elements->end(); ++this->it_element) {
		element = (TextScrollBarElement*) *it_element;
		element->down();
	}
}
